import { createRouter, createWebHistory } from 'vue-router';
import Dashboard from '../views/Dashboard.vue';
import StrategyList from '../views/StrategyList.vue';
import StrategyEdit from '../views/StrategyEdit.vue';
import Backtest from '../views/Backtest.vue';
import BacktestResult from '../views/BacktestResult.vue';
import Trade from '../views/Trade.vue';
import Config from '../views/Config.vue';
import Kline from '../views/Kline.vue';

const routes = [
  {
    path: '/',
    name: 'Dashboard',
    component: Dashboard
  },
  {
    path: '/strategy/list',
    name: 'StrategyList',
    component: StrategyList
  },
  {
    path: '/strategy/edit',
    name: 'StrategyEdit',
    component: StrategyEdit
  },
  {
    path: '/backtest',
    name: 'Backtest',
    component: Backtest
  },
  {
    path: '/backtest/result/:id',
    name: 'BacktestResult',
    component: BacktestResult
  },
  {
    path: '/trade',
    name: 'Trade',
    component: Trade
  },
  {
    path: '/config',
    name: 'Config',
    component: Config
  },
  {
    path: '/kline',
    name: 'Kline',
    component: Kline
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;